﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using LayoutPlanning.Annotations;

namespace LayoutPlanning.Views
{
    /// <summary>
    /// Interaction logic for ChooseScale.xaml
    /// </summary>
    public partial class ChooseScale : Window, INotifyPropertyChanged
    {
        private double _scale = 1;

        public ChooseScale()
        {
            InitializeComponent();
        }

        public double Scale

        {
            get { return _scale; }
            set
            {
                _scale = value; 
                OnPropertyChanged();
            }
        }
        
        public event PropertyChangedEventHandler PropertyChanged;

        [NotifyPropertyChangedInvocator]
        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

        private void Button_OnClick(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
        }
    }
}
